package com.bootdo.wx.service.impl;

import com.bootdo.common.utils.UuidUtil;
import com.bootdo.wx.dao.DataRangeDao;
import com.bootdo.wx.domain.DataRangeDO;
import com.bootdo.wx.service.DataRangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;





@Service
public class DataRangeServiceImpl implements DataRangeService {
	@Autowired
	private DataRangeDao dataRangeDao;
	
	@Override
	public DataRangeDO get(String id){
		return dataRangeDao.get(id);
	}
	
	@Override
	public List<DataRangeDO> list(Map<String, Object> map){
		return dataRangeDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return dataRangeDao.count(map);
	}
	
	@Override
	public int save(DataRangeDO dataRange){
	    dataRange.setId(UuidUtil.get32UUID());
	    dataRange.setDelFlag(0);
		return dataRangeDao.save(dataRange);
	}
	
	@Override
	public int update(DataRangeDO dataRange){
		return dataRangeDao.update(dataRange);
	}
	
	@Override
	public int remove(String id){
		return dataRangeDao.remove(id);
	}
	
	@Override
	public int batchRemove(String[] ids){
		return dataRangeDao.batchRemove(ids);
	}

    @Override
    public List<DataRangeDO> selectDataRangeDOList(DataRangeDO dataRange) {
        return dataRangeDao.selectDataRangeDOList(dataRange);
    }

}
